<template>
    <div>
        <el-table
                :data="recordData"
                size="mini"
                @row-click="rowClick"
        >
            <el-table-column
                    prop="amount"
                    label="数量"
            >
            </el-table-column>
            <el-table-column
                    prop="status"
                    label="状态"
            >
                <template slot-scope="scope">
                    <span style="color:#e68d55" v-if="scope.row.status === 0">已提交</span>
                    <span style="color:#e68d55" v-else-if="scope.row.status == 1">已发送</span>
                    <span style="color:#e68d55" v-else-if="scope.row.status == 2">成功</span>
                    <span style="color:#e68d55" v-else-if="scope.row.status == 3">失败</span>
                    <span style="color:#e68d55" v-else-if="scope.row.status == 4">驳回</span>
                    <span style="color:#e68d55" v-else-if="scope.row.status == 5">通过</span>
                </template>
            </el-table-column>
            <el-table-column
                    prop="updateTime"
                    label="时间"
                    width="140"
            >
            </el-table-column>
        </el-table>
    </div>
</template>

<script>
    export default {
        name: "Record",
        props: {
            type: String,
            recordData: Array,
        },
        data() {
            return {}
        },
        methods: {
            rowClick(row) {
                console.log(row);
                this.$router.push({path: '/m/' + this.type + "-details", query: row})
            }
        }
    }
</script>

<style scoped>

</style>
